package cn.wokoba.service.strategy.armory.algorithm;

import cn.wokoba.service.strategy.repository.StrategyRepository;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;

import java.security.SecureRandom;

// 抽奖算法抽象类

public abstract class AbstractAlgorithm implements IAlgorithm {

    @Autowired
    protected StrategyRepository repository;

    protected final SecureRandom secureRandom = new SecureRandom();

    @Getter
    @AllArgsConstructor
    @NoArgsConstructor
    public enum Algorithm {
        O1("o1Algorithm"), OLogN("oLogNAlgorithm");

        private String key;
    }

}
